services.hostapd.radios.<name>.dynamicConfigScripts

All of these scripts will be executed in lexicographical order before hostapd is started, right after the global segment was generated and may dynamically append global options the generated configuration file.

The first argument will point to the configuration file that you may append to.

Type
attribute set of absolute path
Default
{ }
Example
{
  exampleDynamicConfig = pkgs.writeShellScript "dynamic-config" ''
    HOSTAPD_CONFIG=$1

    cat >> "$HOSTAPD_CONFIG" << EOF
    # Add some dynamically generated statements here,
    # for example based on the physical adapter in use
    EOF
  '';
}
Declared
<nixpkgs/nixos/modules/services/networking/hostapd.nix>